
<nz-steps [(nzCurrent)]="current">
  <nz-step [nzTitle]="'选择公众号'"></nz-step>
  <nz-step [nzTitle]="'选择模板'"></nz-step>
  <nz-step [nzTitle]="'发送'"></nz-step>
</nz-steps>

<div class="steps-content">
  {{index}}
  <nz-spin [nzSpinning]="_isSpinning" >
  <nz-table #nzTable [nzDataSource]="mps" [nzPageSize]="10" [nzIsPagination]="false" *ngIf="current < 1">
    <thead nz-thead>
    <tr>
      <th nz-th><span>id</span></th>
      <th nz-th><span>公众号</span></th>
      <th nz-th><span>appid</span></th>
      <th nz-th><span>描述</span></th>
      <th nz-th><span>用户池</span></th>
      <th nz-th><span>操作</span></th>
    </tr>
    </thead>
    <tbody nz-tbody>
    <tr nz-tbody-tr *ngFor="let data of nzTable.data">
      <td nz-td>
        <a>{{data.id}}</a>
      </td>
      <td nz-td>{{data.mpId}}</td>
      <td nz-td>{{data.appID}}</td>
      <td nz-td>{{data.desc}}</td>
      <td nz-td>{{data.queue}}</td>
      <td nz-td><span>
              <nz-dropdown>
                <a class="ant-dropdown-link" nz-dropdown>
                  更多... <i class="anticon anticon-down"></i>
                </a>
                <ul nz-menu>
                  <li nz-menu-item>
                    <a rel="noopener noreferrer" (click)="selectMp(data.mpId,data.queue)">选择消息模板</a>
                  </li>
                  <li nz-menu-item>
                    <a rel="noopener noreferrer" (click)="inputUser(data.mpId)" >导入用户池</a>
                  </li>
                </ul>
              </nz-dropdown>
            </span></td>
    </tr>
    </tbody>
  </nz-table>

  <nz-table #nzTable [nzDataSource]="mpTpls" [nzPageSize]="10" [nzIsPagination]="false" *ngIf="current === 1">
    <thead nz-thead>
    <tr>
      <th nz-th><span>id</span></th>
      <th nz-th><span>公众号</span></th>
      <th nz-th><span>模板标题</span></th>
      <th nz-th><span>模板id</span></th>
      <th nz-th><span>链接</span></th>
      <th nz-th><span>操作</span></th>
    </tr>
    </thead>
    <tbody nz-tbody>
    <tr nz-tbody-tr *ngFor="let data of nzTable.data">
      <td nz-td>
        <a>{{data.id}}</a>
      </td>
      <td nz-td>{{data.mpid}}</td>
      <td nz-td>{{data.title}}</td>
      <td nz-td>{{data.template_id}}</td>
      <td nz-td><a target="_blank" href="{{data.url}}">{{data.url}}</a></td>
      <td nz-td><span>
              <nz-dropdown>
                <a class="ant-dropdown-link" nz-dropdown>
                  发送... <i class="anticon anticon-down"></i>
                </a>
                <ul nz-menu>
                  <li nz-menu-item>
                    <a rel="noopener noreferrer" (click)="msgSend(data.mpid,data.template_id)">2000</a>
                  </li>
                  <li nz-menu-item>
                    <a rel="noopener noreferrer" (click)="msgSend(data.mpid,data.template_id)">5000</a>
                  </li>
                  <li nz-menu-item>
                    <a rel="noopener noreferrer" (click)="msgSend(data.mpid,data.template_id)">10000</a>
                  </li>
                  <li nz-menu-item>
                    <a rel="noopener noreferrer" (click)="msgSend(data.mpid,data.template_id)">全部</a>
                  </li>
                </ul>
              </nz-dropdown>
            </span></td>
    </tr>
    </tbody>
  </nz-table>


    <nz-alert [nzType]="'info'" [nzMessage]="'消息发送'" [nzDescription]="'发送过程比较长,请稍后...'" *ngIf="current === 2">
    </nz-alert>
  </nz-spin>
</div>


  <!-- <ul><li *ngFor="let mptpl of mpTpls">{{mptpl.id}}{{mptpl.title}}</li></ul> -->

<div class="steps-action">
  <button nz-button [nzType]="'default'" (click)="pre()" *ngIf="current > 0">
    <span>返回</span>
  </button>
  <!--<button nz-button [nzType]="'default'" (click)="next()" *ngIf="current < 2">-->
    <!--<span>Next</span>-->
  <!--</button>-->
  <!--<button nz-button [nzType]="'primary'" (click)="done()" *ngIf="current === 2">-->
    <!--<span>Done</span>-->
  <!--</button>-->
</div>

